from parameterized import parameterized
from api.ihrm_login_api import IhrmLoginApi
from common.assert_util import TestIhrmAssert
from common.ihrm_read_data import Read_data

import config


class Test:
    lujing = config.BASE_DIR +'/data/ihrm_data.json'
    @parameterized.expand(Read_data.read_data(lujing))
    def test(self,login_body,status_code,success,code,message):
        login_resp=IhrmLoginApi.login_api(login_body)
        TestIhrmAssert.ihrm_assert(login_resp,status_code,success,code,message)
